#include <boost/bind.hpp>
#include <vector>
#include <algorithm>
#include <iterator>
#include <iostream>

bool compare(int i, int j)
{
	return i > j;
}

int main()
{
	std::vector<int> v;
	v.push_back(1);
	v.push_back(3);
	v.push_back(2);

	std::sort(v.begin(), v.end(), compare); //* 3 2 1
	std::copy(v.begin(), v.end(), std::ostream_iterator<int>(std::cout," ")); std::cout << std::endl;

	std::sort(v.begin(), v.end(), boost::bind(compare, _1, _2)); //* 3 2 1
	std::copy(v.begin(), v.end(), std::ostream_iterator<int>(std::cout," ")); std::cout << std::endl;

	std::sort(v.begin(), v.end(), boost::bind(compare, _2, _1)); //* 3 2 1
	std::copy(v.begin(), v.end(), std::ostream_iterator<int>(std::cout," ")); std::cout << std::endl;
}